/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.portlet.editor.model.portlet.impl;

import com.genia.toolbox.basics.editor.model.document.Element;
import com.genia.toolbox.portlet.editor.model.portlet.PortletType;
import com.genia.toolbox.web.portlet.description.ContainerPortletDescription.LayoutDirection;

/**
 * Describe a portlet model.
 */
public interface PortletModel
    extends Element<PortletType>
{

  /**
   * Get the element identifier.
   * 
   * @return the element identifier.
   */
  public String getId();



  /**
   * Set the element identifier.
   * 
   * @param id
   *          the element identifier.
   */
  public void setId(String id);



  /**
   * Get the portlet type.
   * 
   * @return the portlet type.
   */
  public PortletType getType();



  /**
   * Set the portlet type.
   * 
   * @param type
   *          the portlet type.
   */
  public void setType(PortletType type);



  /**
   * Update a sub-portlet.
   * 
   * @param updatedPortlet
   *          the updated portlet.
   */
  public void updatePortlet(PortletModel updatedPortlet);



  /**
   * Get the portlet description name.
   * 
   * @return the portlet description name.
   */
  public String getDescriptionName();



  /**
   * Set the portlet description name.
   * 
   * @param descriptionName
   *          the portlet description name.
   */
  public void setDescriptionName(String descriptionName);



  /**
   * Get whether the portlet is a template (it contains at least one hole).
   * 
   * @return whether the portlet is a template.
   */
  public boolean isTemplate();



  /**
   * Get the parent direction.
   * 
   * @return the parent direction.
   */
  public LayoutDirection getParentDirection();



  /**
   * Set the parent direction.
   * 
   * @param parentDirection
   *          the parent direction.
   */
  public void setParentDirection(LayoutDirection parentDirection);

}
